<template>
  <div>
    <!--测试请求案例-->
    <h2>测试请求</h2>
    <button type="button" @click="test01">测试请求</button>
  </div>
</template>

<script>
  export default {
    name: 'TestRequestDemo',
    methods: {
      test01() {
        let url = "test10";

        let p = {
          name: "zs",
          age: 12,
          addr: "beijing",
          hobby: "basketball",
          user: {
            username: "zhangsan",
            password: "112233"
          }
        };

        this.postRequest(url, p).then(res => {
          console.log(res);
        }).catch()

      }
    }
  }
</script>

<style scoped>

</style>
